package com.woniuxy.goods.manaer.controller;

import com.woniuxy.goods.manaer.feigns.GoodsFeignClient;
import com.woniuxy.goods.manaer.feigns.GoodsTypeFeignClient;
import com.woniuxy.goods.module.goods.GoodsType;
import com.woniuxy.goods.module.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class GoodsTypeController {

    @Autowired
    GoodsFeignClient goodsFeignClient ;

    @GetMapping("/goods/typeList")
    public Result<List<GoodsType>> findTypeAll(){
        List<GoodsType> typeAll = goodsFeignClient.findTypeAll();
        return Result.ok(typeAll);
    }
}
